FROM centos:7.2.1511


# 添加用户
RUN useradd --uid=1000 user-dev

# 安装常用工具
RUN yum -y install vim wget net-tools

#安装php
RUN yum -y remove php*
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
RUN yum -y install php72w php72w-cli php72w-common php72w-devel php72w-embedded php72w-fpm php72w-gd php72w-mbstring php72w-mysqlnd php72w-opcache php72w-pdo php72w-xml

WORKDIR /data

#
RUN rpm --rebuilddb && yum -y install python-pip
RUN pip install --upgrade pip
RUN pip install supervisor
RUN mkdir /etc/supervisor

# compsoer
RUN curl -sS https://getcomposer.org/installer | php && \
    mv composer.phar /usr/local/bin/composer

# 安装常用工具
RUN rpm --rebuilddb && yum -y install git

# ffmpeg
RUN rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro && \
    rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
RUN rpm --rebuilddb &&  yum install ffmpeg ffmpeg-devel -y

# 安装nginx sudo
RUN rpm --rebuilddb && yum -y install sudo
RUN sed -i '93iuser-dev    ALL=(ALL)       NOPASSWD:ALL' /etc/sudoers

COPY ./supervisor/supervisord.conf /etc/supervisor/supervisord.conf
USER user-dev
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]





